package duppentity;

import com.google.gson.JsonObject;
import duppentity.annotations.Dupp;
import duppentity.annotations.Param;

import java.util.List;

/**
 * @author yangzhi
 * @date 2019/7/5
 */
public interface FileDupp {

	/**
	 * 图片管理
	 * @return
	 */
	@Dupp("shImageGroup.create")
	JsonObject addImageGroup(@Param("sessionId")String sessionId,
							  @Param("userId")Long userId,
								@Param("shopId")Long shopId,
							 	@Param("name")String name,
								 @Param("createBy")Long createBy);

	@Dupp("shImageGroup.update")
	JsonObject updateImageGroup(@Param("sessionId")String sessionId,
							 @Param("userId")Long userId,
							 @Param("shopId")Long shopId,
							 @Param("id")Long id,
							 @Param("name")String name,
							 @Param("modifyBy")Long modifyBy);


	@Dupp("shImageGroup.get")
	JsonObject getImageGroup(@Param("shopId")Long shopId,
								@Param("id")Long id);

	@Dupp("shImageGroup.delete")
	JsonObject deleteImageGroup(@Param("sessionId")String sessionId,
								@Param("userId")Long userId,
								@Param("shopId")Long shopId,
								@Param("id")Long id,
								@Param("modifyBy")Long modifyBy);

	@Dupp("shImageGroup.getList")
	JsonObject getImageGroupList(@Param("shopId")Long shopId,
							 @Param("offset")Integer offset,
							 @Param("count")Integer count);

	@Dupp("shImage.getList")
	JsonObject  getImageList(@Param("shopId")Long shopId,
							 @Param("groupId")Long groupId,
							 @Param("offset")Integer offset,
							 @Param("count")Integer count);

	@Dupp("shImage.get")
	JsonObject  getImage(@Param("shopId")Long shopId,
							 @Param("id")Long id);


	/**
	 * 获取文件id 154700317500401000 ~ 154700317500401999
	 * @return
	 */
	@Dupp("file.getFileNameId")
	JsonObject getFileNameId();


	@Dupp("shImage.delete")
	JsonObject deleteImage(@Param("sessionId")String sessionId,
								@Param("userId")Long userId,
								@Param("shopId")Long shopId,
								@Param("id")Long id,
								@Param("modifyBy")Long modifyBy);

	@Dupp("shImage.updateOldName")
	JsonObject updateImageOldName(@Param("sessionId")String sessionId,
						   @Param("userId")Long userId,
						   @Param("shopId")Long shopId,
						   @Param("id")Long id,
							 @Param("oldName")String oldName,
						   @Param("modifyBy")Long modifyBy);

	@Dupp("shImage.updateGroupId")
	JsonObject updateImageGroupId(@Param("sessionId")String sessionId,
							 @Param("userId")Long userId,
							 @Param("shopId")Long shopId,
							 @Param("id")Long id,
							 @Param("groupId")Long groupId,
							 @Param("modifyBy")Long modifyBy);



	@Dupp("shVideoGroup.create")
	JsonObject addVideoGroup(@Param("sessionId")String sessionId,
							 @Param("userId")Long userId,
							 @Param("shopId")Long shopId,
							 @Param("name")String name,
							 @Param("createBy")Long createBy);

	@Dupp("shVideoGroup.update")
	JsonObject updateVideoGroup(@Param("sessionId")String sessionId,
								@Param("userId")Long userId,
								@Param("shopId")Long shopId,
								@Param("id")Long id,
								@Param("name")String name,
								@Param("modifyBy")Long modifyBy);


	@Dupp("shVideoGroup.get")
	JsonObject getVideoGroup(@Param("shopId")Long shopId,
							 @Param("id")Long id);

	@Dupp("shVideoGroup.delete")
	JsonObject deleteVideoGroup(@Param("sessionId")String sessionId,
								@Param("userId")Long userId,
								@Param("shopId")Long shopId,
								@Param("id")Long id,
								@Param("modifyBy")Long modifyBy);

	@Dupp("shVideoGroup.getList")
	JsonObject getVideoGroupList(@Param("shopId")Long shopId,
								 @Param("offset")Integer offset,
								 @Param("count")Integer count);

	@Dupp("shVideo.getList")
	JsonObject  getVideoList(@Param("shopId")Long shopId,
							 @Param("groupId")Long groupId,
							 @Param("offset")Integer offset,
							 @Param("count")Integer count);

	@Dupp("shVideo.get")
	JsonObject  getVideo(@Param("shopId")Long shopId,
							 @Param("id")Long id);

	@Dupp("shVideo.delete")
	JsonObject deleteVideo(@Param("sessionId")String sessionId,
						   @Param("userId")Long userId,
						   @Param("shopId")Long shopId,
						   @Param("id")Long id,
						   @Param("modifyBy")Long modifyBy);

	@Dupp("shVideo.updateOldName")
	JsonObject updateVideoOldName(@Param("sessionId")String sessionId,
							 @Param("userId")Long userId,
							 @Param("shopId")Long shopId,
							 @Param("id")Long id,
							 @Param("oldName")String oldName,
							 @Param("modifyBy")Long modifyBy);

	@Dupp("shVideo.updateGroupId")
	JsonObject updateVideoGroupId(@Param("sessionId")String sessionId,
							 @Param("userId")Long userId,
							 @Param("shopId")Long shopId,
							 @Param("id")Long id,
							 @Param("groupId")Long groupId,
							 @Param("modifyBy")Long modifyBy);


	@Dupp("shVideo.updateImageId")
	JsonObject updateVideoImageId(@Param("sessionId")String sessionId,
								  @Param("userId")Long userId,
								  @Param("shopId")Long shopId,
								  @Param("id")Long id,
								  @Param("imageId")Long imageId,
								  @Param("modifyBy")Long modifyBy);


	/**
	 *
	 * @param shopId
	 * @param idList 图片id
	 * @return
	 */
	@Dupp("shImage.getNameIdMap")
	JsonObject getImageNameIdMap(@Param("shopId")Long shopId,
								 @Param("idList")List<Long> idList);

	/**
	 *
	 * @param shopId
	 * @param idList 视频id
	 * @return
	 */
	@Dupp("shVideo.getNameIdMap")
	JsonObject getVideoNameIdMap(@Param("shopId")Long shopId,
								 @Param("idList")List<Long> idList);
}
